package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmShengWuShouTiMapper;
import com.ruoyi.web.tdm.domain.TdmShengWuShouTi;
import com.ruoyi.web.tdm.service.ITdmShengWuShouTiService;

/**
 * ID-09 -21 生物受体Service业务层处理
 * 
 * @author ly
 * @date 2022-03-14
 */
@Service
public class TdmShengWuShouTiServiceImpl implements ITdmShengWuShouTiService 
{
    @Autowired
    private TdmShengWuShouTiMapper tdmShengWuShouTiMapper;

    /**
     * 查询ID-09 -21 生物受体
     * 
     * @param id ID-09 -21 生物受体主键
     * @return ID-09 -21 生物受体
     */
    @Override
    public TdmShengWuShouTi selectTdmShengWuShouTiById(Long id)
    {
        return tdmShengWuShouTiMapper.selectTdmShengWuShouTiById(id);
    }

    /**
     * 查询ID-09 -21 生物受体列表
     * 
     * @param tdmShengWuShouTi ID-09 -21 生物受体
     * @return ID-09 -21 生物受体
     */
    @Override
    public List<TdmShengWuShouTi> selectTdmShengWuShouTiList(TdmShengWuShouTi tdmShengWuShouTi)
    {
        return tdmShengWuShouTiMapper.selectTdmShengWuShouTiList(tdmShengWuShouTi);
    }

    @Override
    public List<TdmShengWuShouTi> selectTdmShengWuShouTiEnzymeLinkList(TdmShengWuShouTi tdmShengWuShouTi) {
        return tdmShengWuShouTiMapper.selectTdmShengWuShouTiEnzymeLinkList(tdmShengWuShouTi);
    }

    @Override
    public List<TdmShengWuShouTi> selectTdmShengWuShouTiIonChannelList(TdmShengWuShouTi tdmShengWuShouTi) {
        return tdmShengWuShouTiMapper.selectTdmShengWuShouTiIonChannelList(tdmShengWuShouTi);
    }

    @Override
    public List<TdmShengWuShouTi> selectTdmShengWuShouTiCellFactorList(TdmShengWuShouTi tdmShengWuShouTi) {
        return tdmShengWuShouTiMapper.selectTdmShengWuShouTiCellFactorList(tdmShengWuShouTi);
    }

    @Override
    public List<TdmShengWuShouTi> selectTdmShengWuShouTiNucleusList(TdmShengWuShouTi tdmShengWuShouTi) {
        return tdmShengWuShouTiMapper.selectTdmShengWuShouTiNucleusList(tdmShengWuShouTi);
    }

    /**
     * 新增ID-09 -21 生物受体
     * 
     * @param tdmShengWuShouTi ID-09 -21 生物受体
     * @return 结果
     */
    @Override
    public int insertTdmShengWuShouTi(TdmShengWuShouTi tdmShengWuShouTi)
    {
        tdmShengWuShouTi.setCreateTime(DateUtils.getNowDate());
        tdmShengWuShouTi.setCreateByName(SecurityUtils.getUsername());
        tdmShengWuShouTi.setShenHe(0L);
        return tdmShengWuShouTiMapper.insertTdmShengWuShouTi(tdmShengWuShouTi);
    }

    @Override
    public int insertTdmShengWuShouTiEnzymeLink(TdmShengWuShouTi tdmShengWuShouTi) {
        tdmShengWuShouTi.setCreateTime(DateUtils.getNowDate());
        tdmShengWuShouTi.setCreateByName(SecurityUtils.getUsername());
        tdmShengWuShouTi.setShenHe(0L);
        return tdmShengWuShouTiMapper.insertTdmShengWuShouTiEnzymeLink(tdmShengWuShouTi);
    }

    @Override
    public int insertTdmShengWuShouTiIonChannel(TdmShengWuShouTi tdmShengWuShouTi) {
        tdmShengWuShouTi.setCreateTime(DateUtils.getNowDate());
        tdmShengWuShouTi.setCreateByName(SecurityUtils.getUsername());
        tdmShengWuShouTi.setShenHe(0L);
        return tdmShengWuShouTiMapper.insertTdmShengWuShouTiIonChannel(tdmShengWuShouTi);
    }

    @Override
    public int insertTdmShengWuShouTiCellFactor(TdmShengWuShouTi tdmShengWuShouTi) {
        tdmShengWuShouTi.setCreateTime(DateUtils.getNowDate());
        tdmShengWuShouTi.setCreateByName(SecurityUtils.getUsername());
        tdmShengWuShouTi.setShenHe(0L);
        return tdmShengWuShouTiMapper.insertTdmShengWuShouTiCellFactor(tdmShengWuShouTi);
    }

    @Override
    public int insertTdmShengWuShouTiNucleus(TdmShengWuShouTi tdmShengWuShouTi) {
        tdmShengWuShouTi.setCreateTime(DateUtils.getNowDate());
        tdmShengWuShouTi.setCreateByName(SecurityUtils.getUsername());
        tdmShengWuShouTi.setShenHe(0L);
        return tdmShengWuShouTiMapper.insertTdmShengWuShouTiNucleus(tdmShengWuShouTi);
    }

    /**
     * 修改ID-09 -21 生物受体
     * 
     * @param tdmShengWuShouTi ID-09 -21 生物受体
     * @return 结果
     */
    @Override
    public int updateTdmShengWuShouTi(TdmShengWuShouTi tdmShengWuShouTi)
    {
        tdmShengWuShouTi.setUpdateTime(DateUtils.getNowDate());
        return tdmShengWuShouTiMapper.updateTdmShengWuShouTi(tdmShengWuShouTi);
    }

    /**
     * 批量删除ID-09 -21 生物受体
     * 
     * @param ids 需要删除的ID-09 -21 生物受体主键
     * @return 结果
     */
    @Override
    public int deleteTdmShengWuShouTiByIds(Long[] ids)
    {
        return tdmShengWuShouTiMapper.deleteTdmShengWuShouTiByIds(ids);
    }

    /**
     * 删除ID-09 -21 生物受体信息
     * 
     * @param id ID-09 -21 生物受体主键
     * @return 结果
     */
    @Override
    public int deleteTdmShengWuShouTiById(Long id)
    {
        return tdmShengWuShouTiMapper.deleteTdmShengWuShouTiById(id);
    }
}
